/*
 * @Author: fangshengchu
 * @Date: 2024-06-14 17:59:06
 * @LastEditTime: 2024-06-26 17:27:45
 * @LastEditors: fangshengchu
 * @Description:
 * @FilePath: \szhk-fe\src\api\reverse-procurement\product-handling.ts
 */
import request from '@/utils/request/request';
import requestForFile from '@/utils/request/requestForFile';
// 分页查询采购逆向
export function getScsProductPage(params: any) {
  return request.get('/api/procurement/delivery/product-reverse/page', {
    params,
  });
}
// 编辑逆向产品处理
export function updateScsProductDetail(data: any) {
  return request.put('/api/procurement/delivery/product-reverse', data);
}
// 详情采购逆向
export function getScsProductDetail(id: any) {
  return request.get(`/api/procurement/delivery/product-reverse/${id}`);
}
// 获取情况跟踪
export function getScsProductReverseList(id: any) {
  return request.get(
    `/api/procurement/delivery/product-reverse/getProductReverseL/${id}`
  );
}
// 导入
export function importExcelToData(data: FormData) {
  return request.post(
    '/api/procurement/delivery/product-reverse/import',
    data,
    {
      headers: {
        'Content-Type': 'application/form-data',
      },
    }
  );
}
// 下载模板
export function downloadTemplate() {
  return requestForFile.get(
    `/api/procurement/delivery/product-reverse/download/template`,
    {
      responseType: 'blob',
    }
  );
}
